package com.example.demo.service.Impl;

import com.example.demo.mapper.SettingMapper;
import com.example.demo.pojo.Setting;
import com.example.demo.service.SettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SettingServiceImpl implements SettingService {
    @Autowired
    private SettingMapper settingMapper;
    //查询配置项
    public List<Setting> settingSelect(String key) {
        return settingMapper.settingSelect(key);
    }
    //删除配置项
    @Override
    public void deleteSetting(Integer id) {
        settingMapper.deleteSetting(id);
    }
    //修改配置项
    @Override
    public void updateSetting(Setting setting) {
        settingMapper.updateSetting(setting);
    }
    //普通用户获取配置项
    @Override
    public List<Setting> settingPuTongSelect(String key) {
        return settingMapper.settingPuTongSelect(key);
    }

    @Override
    public int selectValue(String key) {
        return settingMapper.selectValue(key);
    }
}
